<!DOCTYPE html>



  


<html class="theme-next pisces use-motion" lang="zh-Hans">
<head><meta name="generator" content="Hexo 3.8.0">
  <meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="theme-color" content="#222">









<meta http-equiv="Cache-Control" content="no-transform">
<meta http-equiv="Cache-Control" content="no-siteapp">
















  
  
  <link href="/blog/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css">







<link href="/blog/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css">

<link href="/blog/css/main.css?v=5.1.4" rel="stylesheet" type="text/css">


  <link rel="apple-touch-icon" sizes="180x180" href="/blog/images/apple-touch-icon-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="32x32" href="/blog/images/favicon-32x32-next.png?v=5.1.4">


  <link rel="icon" type="image/png" sizes="16x16" href="/blog/images/favicon-16x16-next.png?v=5.1.4">


  <link rel="mask-icon" href="/blog/images/logo.svg?v=5.1.4" color="#222">





  <meta name="keywords" content="Web,Tor,">










<meta name="description" content="定位 查询descriptor在\src\feature\dirclient\dirclient.c的handle_response_fetch_hsdesc_v3">
<meta name="keywords" content="Web,Tor">
<meta property="og:type" content="article">
<meta property="og:title" content="修改Tor源码的尝试">
<meta property="og:url" content="https://catchmenow.gitee.io/blog/2019/02/10/1/index.html">
<meta property="og:site_name" content="ssilent&#39;s blog">
<meta property="og:description" content="定位 查询descriptor在\src\feature\dirclient\dirclient.c的handle_response_fetch_hsdesc_v3">
<meta property="og:locale" content="zh-Hans">
<meta property="og:image" content="https://catchmenow.gitee.io/blog/2019/02/10/1/Image.png">
<meta property="og:updated_time" content="2019-02-10T09:31:39.385Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="修改Tor源码的尝试">
<meta name="twitter:description" content="定位 查询descriptor在\src\feature\dirclient\dirclient.c的handle_response_fetch_hsdesc_v3">
<meta name="twitter:image" content="https://catchmenow.gitee.io/blog/2019/02/10/1/Image.png">



<script type="text/javascript" id="hexo.configurations">
  var NexT = window.NexT || {};
  var CONFIG = {
    root: '/blog/',
    scheme: 'Pisces',
    version: '5.1.4',
    sidebar: {"position":"left","display":"post","offset":12,"b2t":false,"scrollpercent":false,"onmobile":false},
    fancybox: true,
    tabs: true,
    motion: {"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},
    duoshuo: {
      userId: '0',
      author: 'ssilent'
    },
    algolia: {
      applicationID: '',
      apiKey: '',
      indexName: '',
      hits: {"per_page":10},
      labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
    }
  };
</script>



  <link rel="canonical" href="https://catchmenow.gitee.io/blog/2019/02/10/1/">





  <title>修改Tor源码的尝试 | ssilent's blog</title>
  








</head>

<body itemscope="" itemtype="http://schema.org/WebPage" lang="zh-Hans">

  
  
    
  

  <div class="container sidebar-position-left page-post-detail">
    <div class="headband"></div>
    <a href="https://github.com/Mitsushima0" class="github-corner" aria-label="View source on GitHub"><svg width="80" height="80" viewbox="0 0 250 250" style="fill:#151513; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style>
    
    <header id="header" class="header" itemscope="" itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-wrapper">
  <div class="site-meta ">
    

    <div class="custom-logo-site-title">
      <a href="/blog/" class="brand" rel="start">
        <span class="logo-line-before"><i></i></span>
        <span class="site-title">ssilent's blog</span>
        <span class="logo-line-after"><i></i></span>
      </a>
    </div>
      
        <p class="site-subtitle"></p>
      
  </div>

  <div class="site-nav-toggle">
    <button>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
      <span class="btn-bar"></span>
    </button>
  </div>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu">
      
        
        <li class="menu-item menu-item-home">
          <a href="/blog/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-home"></i> <br>
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-tags">
          <a href="/blog/tags/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-tags"></i> <br>
            
            标签
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/blog/categories/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-th"></i> <br>
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/blog/archives/" rel="section">
            
              <i class="menu-item-icon fa fa-fw fa-archive"></i> <br>
            
            归档
          </a>
        </li>
      

      
    </ul>
  

  
</nav>



 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            

  <div id="posts" class="posts-expand">
    

  

  
  
  

  <article class="post post-type-normal" itemscope="" itemtype="http://schema.org/Article">
  
  
  
  <div class="post-block">
    <link itemprop="mainEntityOfPage" href="https://catchmenow.gitee.io/blog/blog/2019/02/10/1/">

    <span hidden itemprop="author" itemscope="" itemtype="http://schema.org/Person">
      <meta itemprop="name" content="ssilent">
      <meta itemprop="description" content="">
      <meta itemprop="image" content="/blog/images/p2.jpg">
    </span>

    <span hidden itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="ssilent's blog">
    </span>

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">修改Tor源码的尝试</h1>
        

        <div class="post-meta">
          <span class="post-time">
            
              <span class="post-meta-item-icon">
                <i class="fa fa-calendar-o"></i>
              </span>
              
                <span class="post-meta-item-text">发表于</span>
              
              <time title="创建于" itemprop="dateCreated datePublished" datetime="2019-02-10T13:36:37+08:00">
                2019-02-10
              </time>
            

            

            
          </span>

          
            <span class="post-category">
            
              <span class="post-meta-divider">|</span>
            
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              
                <span class="post-meta-item-text">分类于</span>
              
              
                <span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
                  <a href="/blog/categories/Web/" itemprop="url" rel="index">
                    <span itemprop="name">Web</span>
                  </a>
                </span>

                
                
              
            </span>
          

          
            
              <span class="post-comments-count">
                <span class="post-meta-divider">|</span>
                <span class="post-meta-item-icon">
                  <i class="fa fa-comment-o"></i>
                </span>
                <a href="/blog/2019/02/10/1/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count valine-comment-count" data-xid="/blog/2019/02/10/1/" itemprop="commentCount"></span>
                </a>
              </span>
            
          

          
          

          

          
            <div class="post-wordcount">
              
                
                <span class="post-meta-item-icon">
                  <i class="fa fa-file-word-o"></i>
                </span>
                
                  <span class="post-meta-item-text">字数统计&#58;</span>
                
                <span title="字数统计">
                  701
                </span>
              

              
                <span class="post-meta-divider">|</span>
              

              
                <span class="post-meta-item-icon">
                  <i class="fa fa-clock-o"></i>
                </span>
                
                  <span class="post-meta-item-text">阅读时长 &asymp;</span>
                
                <span title="阅读时长">
                  2
                </span>
              
            </div>
          

          

        </div>
      </header>
    

    
    
    
    <div class="post-body" itemprop="articleBody">

      
      

      
        <h1 id="定位"><a href="#定位" class="headerlink" title="定位"></a>定位</h1><ul>
<li>查询<em>descriptor</em>在<code>\src\feature\dirclient\dirclient.c</code>的<em><code>handle_response_fetch_hsdesc_v3</code></em><a id="more"></a></li>
<li>存储<em>descscriptor</em>在<code>\src\feature\hs\hs_cache.c</code>的<em><code>hs_cache_store_as_client</code></em></li>
<li>解析<em>desc_str</em>并创建<em>client_desc</em>在<code>\src\feature\hs\hs_cache.c</code>的<em><code>cache_client_desc_new</code></em></li>
<li><em>desccriptor</em>加解密源文件<code>\src\feature\hs\hs_descriptor.c</code></li>
</ul>
<h1 id="分析"><a href="#分析" class="headerlink" title="分析"></a>分析</h1><p>我们直接从dirclient.c的 <em><code>handle_response_fetch_hsdesc_v3</code></em> 函数开始看，</p>
<ul>
<li>接到一个对<em>hidden service descriptor</em>的请求<ul>
<li>函数名：<em><code>handle_response_fetch_hsdesc_v3</code></em></li>
<li>位置：dirclient.c</li>
<li>参数：<ul>
<li>_dir_connection_t  *conn_（目录连接，包含请求资源、路由目标等信息）</li>
<li>_const response_handler_args_t *args_（保存了响应处理参数）<ul>
<li>功能：<blockquote>
<p>  处理对隐藏服务描述符的请求</p>
</blockquote>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<ul>
<li>状态码为200时，跳入函数 <em><code>hs_cache_store_as_client</code></em><ul>
<li>函数名：<em><code>hs_cache_store_as_client</code></em></li>
<li>位置：hs_cache.c</li>
<li>参数：<ul>
<li>_const char *desc_str_（初始描述符字符串）</li>
<li>_const ed25519_public_key_t *identity_pk_（公钥）</li>
</ul>
</li>
<li>功能：<blockquote>
<p>   公共API，给定编码描述符，将其存储在客户端HS中缓存。 错误时返回-1，成功时返回0</p>
</blockquote>
</li>
</ul>
</li>
</ul>
<ul>
<li>为了创建客户端的描述符对象，跳入函数 <em><code>cache_client_desc_new</code></em><ul>
<li>函数名：<em><code>hs_cache_store_as_client</code></em></li>
<li>位置：hs_cache.c</li>
<li>参数：<ul>
<li>_const char *desc_str_ （初始描述符字符串）</li>
<li>_const ed25519_public_key_t *service_identity_pk_ （公钥）</li>
</ul>
</li>
<li>功能：<blockquote>
<p>   使用在desc_str中解析编码的描述符service_identity_pk首先解密它。如果一切顺利，请分配并返回新的hs_cache_client_descriptor_t对象。 如果出现错误，则返回NULL。</p>
</blockquote>
</li>
</ul>
</li>
</ul>
<ul>
<li><p>为解码<em>desc_str</em>做准备，跳入 <em><code>hs_client_decode_descriptor</code></em></p>
<pre><code>* 函数名 : *`hs_client_decode_descriptor`*
* 位置：hs_client.c
* 参数：
     * _const char *desc_str_（初始描述符字符串）
      * _const ed25519_public_key_t *service_identity_pk_（公钥）
     *     _hs_descriptor_t **desc_ （要返回的描述符对象）
* 功能：
  &gt;   使用desc_str中的给定编码描述符和service_identity_pk中的服务密钥，解码描述符并使用新分配的描述符对象设置desc指针。成功时返回0，否则为负值，desc设置为NULL。
</code></pre></li>
<li><p>开始解码描述符，跳入 <em><code>hs_desc_decode_descriptor</code></em>（<strong>重点</strong>）</p>
<ul>
<li>函数名：<em><code>hs_desc_decode_descriptor</code></em></li>
<li>位置：hs_descriptor.c</li>
<li>参数：<ul>
<li><em>const char *encoded</em>（初始描述符字符串）</li>
<li>_const uint8_t *subcredential_（上一步生成的子凭据）<ul>
<li>_const curve25519_secret_key_t *client_auth_sk_（客户端密钥）</li>
<li>_hs_descriptor_t **desc_out_（新的描述符对象）</li>
</ul>
</li>
</ul>
</li>
<li>功能：<blockquote>
<p>解码给定描述符的加密数据部分并存储给定加密数据对象中的数据。 成功时返回0，否则返回错误的负值。</p>
</blockquote>
</li>
<li>子函数：<ul>
<li>hs_desc_decode_plaintext</li>
<li>hs_desc_decode_superencrypted</li>
<li>hs_desc_decode_encrypted  </li>
</ul>
</li>
</ul>
</li>
</ul>
<h1 id="修改"><a href="#修改" class="headerlink" title="修改"></a>修改</h1><h2 id="Try-1-拿到desc-str"><a href="#Try-1-拿到desc-str" class="headerlink" title="Try-1 拿到desc_str"></a>Try-1 拿到desc_str</h2><p>在hs_cache.c进行修改，只取能够解析的描述符字符串。<br><figure class="highlight plain"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br></pre></td><td class="code"><pre><span class="line">/* Create client cache descriptor object */</span><br><span class="line">client_desc = cache_client_desc_new(desc_str, identity_pk);</span><br><span class="line">if (!client_desc) &#123;</span><br><span class="line">  log_warn(LD_GENERAL, &quot;Failed to parse received descriptor %s.&quot;,</span><br><span class="line">           escaped(desc_str));</span><br><span class="line">  goto err;</span><br><span class="line">&#125;</span><br><span class="line">//my alter</span><br><span class="line">if (client_desc) &#123;</span><br><span class="line">  write_desc(desc_str);</span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure></p>
<p>尝试修改源码然后编译运行后，没有输出fwirte文件，原因：</p>
<ul>
<li>没有运行到该函数，或配置文件有误。</li>
</ul>
<p>查看<code>./doc/Hacking/WritingTests.md</code>发现有源码里给了test方案，便于用户测试。<br>于是，在<code>./src/test</code>目录下运行<code>./test</code><br>fwrite文件就有输出了，不过因为是初始的desc_str，没有decode过，只有头部可见。<br><img src="/blog/2019/02/10/1/Image.png" alt="e268506dcd3e0ae053ebdf2fb1134646.png"><br>说明修改的部分没有问题，下一步要拿到解码后的。</p>
<h2 id="Try-2-拿到解码后的desc"><a href="#Try-2-拿到解码后的desc" class="headerlink" title="Try-2 拿到解码后的desc"></a>Try-2 拿到解码后的desc</h2>
      
    </div>
    
    
    

    <div>
      
        
<div class="my_post_copyright">
  <script src="//cdn.bootcss.com/clipboard.js/1.5.10/clipboard.min.js"></script>

  <!-- JS库 sweetalert 可修改路径 -->
  <script src="https://cdn.bootcss.com/jquery/2.0.0/jquery.min.js"></script>
  <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
  <p><span>本文标题:</span><a href="/blog/2019/02/10/1/">修改Tor源码的尝试</a></p>
  <p><span>文章作者:</span><a href="/" title="访问 ssilent 的个人博客">ssilent</a></p>
  <p><span>发布时间:</span>2019年02月10日 - 13:36</p>
  <p><span>最后更新:</span>2019年02月10日 - 17:31</p>
  <p><span>原始链接:</span><a href="/blog/2019/02/10/1/" title="修改Tor源码的尝试">https://catchmenow.gitee.io/blog/2019/02/10/1/</a>
    <span class="copy-path" title="点击复制文章链接"><i class="fa fa-clipboard" data-clipboard-text="https://catchmenow.gitee.io/blog/2019/02/10/1/" aria-label="复制成功！"></i></span>
  </p>
  <p><span>许可协议:</span><i class="fa fa-creative-commons"></i> <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" target="_blank" title="Attribution-NonCommercial-NoDerivatives 4.0 International (CC BY-NC-ND 4.0)">署名-非商业性使用-禁止演绎 4.0 国际</a> 转载请保留原文链接及作者。</p>
</div>
<script>
    var clipboard = new Clipboard('.fa-clipboard');
    $(".fa-clipboard").click(function(){
      clipboard.on('success', function(){
        swal({
          title: "",
          text: '复制成功',
          icon: "success",
          showConfirmButton: true
          });
  });
    });
</script>

      
    </div>

    <div>
      
        <div>
    
        <div style="text-align:center;color: #ccc;font-size:14px;">-------------本文结束<i class="fa fa-heartbeat"></i>感谢您的阅读-------------</div>
    
</div>
      
    </div>

    

    

    

    <footer class="post-footer">
      
        <div class="post-tags">
          
            <a href="/blog/tags/Web/" rel="tag"><i class="fa fa-tag"></i> Web</a>
          
            <a href="/blog/tags/Tor/" rel="tag"><i class="fa fa-tag"></i> Tor</a>
          
        </div>
      

      
      
      

      
        <div class="post-nav">
          <div class="post-nav-next post-nav-item">
            
              <a href="/blog/2019/02/06/1/" rel="next" title="初高中英语学习生活回忆">
                <i class="fa fa-chevron-left"></i> 初高中英语学习生活回忆
              </a>
            
          </div>

          <span class="post-nav-divider"></span>

          <div class="post-nav-prev post-nav-item">
            
              <a href="/blog/2020/01/10/21/" rel="prev" title="Web安全渗透测试攻防指南（一）">
                Web安全渗透测试攻防指南（一） <i class="fa fa-chevron-right"></i>
              </a>
            
          </div>
        </div>
      

      
      
    </footer>
  </div>
  
  
  
  </article>



    <div class="post-spread">
      
    </div>
  </div>


          </div>
          


          

  
    <div class="comments" id="comments">
    </div>
  



        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    
    <div class="sidebar-inner">

      

      
        <ul class="sidebar-nav motion-element">
          <li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap">
            文章目录
          </li>
          <li class="sidebar-nav-overview" data-target="site-overview-wrap">
            站点概览
          </li>
        </ul>
      

      <section class="site-overview-wrap sidebar-panel">
        <div class="site-overview">
          <div class="site-author motion-element" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
            
              <img class="site-author-image" itemprop="image" src="/blog/images/p2.jpg" alt="ssilent">
            
              <p class="site-author-name" itemprop="name">ssilent</p>
              <p class="site-description motion-element" itemprop="description"></p>
          </div>

          <nav class="site-state motion-element">

            
              <div class="site-state-item site-state-posts">
              
                <a href="/blog/archives/">
              
                  <span class="site-state-item-count">8</span>
                  <span class="site-state-item-name">日志</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-categories">
                <a href="/blog/categories/index.html">
                  <span class="site-state-item-count">5</span>
                  <span class="site-state-item-name">分类</span>
                </a>
              </div>
            

            
              
              
              <div class="site-state-item site-state-tags">
                <a href="/blog/tags/index.html">
                  <span class="site-state-item-count">7</span>
                  <span class="site-state-item-name">标签</span>
                </a>
              </div>
            

          </nav>

          

          

          
          

          
          

          

        </div>
      </section>

      
      <!--noindex-->
        <section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
          <div class="post-toc">

            
              
            

            
              <div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#定位"><span class="nav-number">1.</span> <span class="nav-text">定位</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#分析"><span class="nav-number">2.</span> <span class="nav-text">分析</span></a></li><li class="nav-item nav-level-1"><a class="nav-link" href="#修改"><span class="nav-number">3.</span> <span class="nav-text">修改</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#Try-1-拿到desc-str"><span class="nav-number">3.1.</span> <span class="nav-text">Try-1 拿到desc_str</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#Try-2-拿到解码后的desc"><span class="nav-number">3.2.</span> <span class="nav-text">Try-2 拿到解码后的desc</span></a></li></ol></li></ol></div>
            

          </div>
        </section>
      <!--/noindex-->
      

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <script async src="https://busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script>

<div class="copyright">&copy; <span itemprop="copyrightYear">2020</span>
  <span class="with-love">
    <i class="fa fa-user"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">ssilent</span>

  
</div>

<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
  本站访客数:<span id="busuanzi_value_site_uv"></span>
</span>
</div>


<!--

 <div class="powered-by">由 <a class="theme-link" target="_blank" href="https://hexo.io">Hexo</a> 强力驱动</div>

  -->


  <span class="post-meta-divider">|</span>


<!--

  <div class="theme-info">主题 &mdash; <a class="theme-link" target="_blank" href="https://github.com/iissnan/hexo-theme-next">NexT.Pisces</a> v5.1.4</div>

-->



<div class="theme-info">
  <div class="powered-by"></div>
  <span class="post-count">博客全站共17k字</span>
</div>
        







        
      </div>
    </footer>

    
      <div class="back-to-top">
        <i class="fa fa-arrow-up"></i>
        
      </div>
    

    

  </div>

  

<script type="text/javascript">
  if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
    window.Promise = null;
  }
</script>









  


  











  
  
    <script type="text/javascript" src="/blog/lib/jquery/index.js?v=2.1.3"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
  

  
  
    <script type="text/javascript" src="/blog/lib/canvas-nest/canvas-nest.min.js"></script>
  


  


  <script type="text/javascript" src="/blog/js/src/utils.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/motion.js?v=5.1.4"></script>



  
  


  <script type="text/javascript" src="/blog/js/src/affix.js?v=5.1.4"></script>

  <script type="text/javascript" src="/blog/js/src/schemes/pisces.js?v=5.1.4"></script>



  
  <script type="text/javascript" src="/blog/js/src/scrollspy.js?v=5.1.4"></script>
<script type="text/javascript" src="/blog/js/src/post-details.js?v=5.1.4"></script>



  


  <script type="text/javascript" src="/blog/js/src/bootstrap.js?v=5.1.4"></script>



  


  




	





  





  










  <script src="//cdn1.lncld.net/static/js/3.0.4/av-min.js"></script>
  <script src="//cdn.jsdelivr.net/npm/valine/dist/Valine.min.js"></script>

  <script type="text/javascript">
    var GUEST = ['nick','mail','link'];
    var guest = 'nick,mail,link';
    guest = guest.split(',').filter(item=>{
      return GUEST.indexOf(item)>-1;
    });
    new Valine({
        el: '#comments' ,
        verify: false,
        notify: false,
        appId: 'lYp2MtSUmdwhTqLdx7PMPM2R-gzGzoHsz',
        appKey: 'tuvkxTJOf6ngjmCMKwn7e5TS',
        placeholder: '旺仔QQ糖，你也要来一颗吗？',
        avatar:'mm',
        guest_info:guest,
        pageSize:'10' || 10,
    });
  </script>



  





  

  

  

  
  

  

  

  

  
  
  
<script src="/blog/live2dw/lib/L2Dwidget.min.js?0c58a1486de42ac6cc1c59c7d98ae887"></script><script>L2Dwidget.init({"pluginRootPath":"live2dw/","pluginJsPath":"lib/","pluginModelPath":"assets/","model":{"jsonPath":"live2d-widget-model-shiziku"},"display":{"position":"left","width":75,"height":150},"mobile":{"show":true},"log":false,"tagMode":false});</script></body>
</html>
